{% extends '::layout.html.twig' %}

{% block title %}Se connecter{% endblock %}

{% block js %}	
    <script type="text/javascript" src="{{ asset('js/jquery.validate.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/lettraluser/js/jquery.login.js') }}"></script>
{% endblock %}

{% block content %}

<div id="connection">
	<div id='login'>
		<h2>Déjà un compte ?</h2>
	  		{% if error %}
            	<div class="error_summary">{{ error }}</div>
        	{% endif %}
	        <form action="{{ path("fos_user_security_check") }}" method="post" class="top" id="connect" novalidate="novalidate">
	            <label for="username">Login :</label><br />
	            <input type="text" id="username" name="_username" value="{{ last_username }}" required="required" />
	            <br />
	            <label for="password">Mot de passe :</label><br />
	            <input type="password" id="password" name="_password" required="required" />
	            <br />
	            <label for="remember_me">Se rappeler de moi</label>
	            <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
	            <br />
	            <button class="validate" id="connect">Se connecter</button>
	        </form>
	</div>
	
	<div id='register'>
		<h2>Pas encore de compte ?</h2>
	  	<p>C'est indispensable pour créer ses lettres ! <br />
	  	N'hésitez pas, c'est gratuit !</p>
	    <a href="{{ path("fos_user_registration_register") }}"><button class="validate" id="create">Créer un compte</button></a>
	</div>
</div>


{% endblock %}